<?php
/**
 * Created by PhpStorm.
 * User: MF
 * Date: 2017/5/31
 * Time: 21:30
 */


namespace App\Mailer;

use Mail;
use Naux\Mail\SendCloudTemplate;

class Mailer
{
	protected function sendTo($template, $email, array $data)
	{

		$content = new SendCloudTemplate($template, $data);

		Mail::raw($content, function ($message) use ($email)  {
			$message->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_USER'));
			$message->to($email);
		});
	}

}